package visitorpattern;

import bookworm.Review;
import graph.BookReviewNode;

/**
 * Class only used for tests. This visitor just prints on console(terminal) the id 
 * and name of a review from a BookReviewNode
 *
 */
public class VisitorJustPrintsBookReviewNodeInformation implements Visitor
{

	@Override
	public void visitBookReviewNode(BookReviewNode nodeVisited) 
	{
		Review bookReview = nodeVisited.getReviewData();
		int id = bookReview.getReviewId();
		String reviewName = bookReview.getReviewTitle();
		System.out.println("visited node with id = " + id + " and name=" + reviewName);
	}
}
